package nil.ed.simulator.request.guice.activity;

import com.google.inject.AbstractModule;
import com.google.inject.multibindings.Multibinder;
import nil.ed.simulator.request.biz.qq.activity.*;
import nil.ed.simulator.request.client.activity.ActivityEngine;
import nil.ed.simulator.request.client.activity.ActivityRepo;
import nil.ed.simulator.request.client.activity.IActivity;

public class ActivityModule extends AbstractModule {
    @Override
    protected void configure() {
        Multibinder<IActivity> activityBinder = Multibinder.newSetBinder(binder(), IActivity.class);
        activityBinder.addBinding().to(Seq002AppIndexActivity.class).asEagerSingleton();
        activityBinder.addBinding().to(Seq004CheckActivity.class).asEagerSingleton();
        activityBinder.addBinding().to(Seq005FinalLoginActivity.class).asEagerSingleton();
        activityBinder.addBinding().to(Seq003XLoginActivity.class).asEagerSingleton();
        activityBinder.addBinding().to(Seq001EnvInitialActivity.class).asEagerSingleton();
        activityBinder.permitDuplicates();

        bind(ActivityRepo.class).toInstance(new ActivityRepo());
        bind(ActivityEngine.class).toInstance(new ActivityEngine());
    }

}
